﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Finance_Salemessage : System.Web.UI.Page
{
    Function f = new Function();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            lblPath.Text = f.getModuleidAdd(Request.QueryString["moduid"].ToString());
                initData();
        }
    }
    private void initData()
    {
        string sql = "select SalesCode,comodid,Convert(char(10),C_date,120) as cdate,typeStock,GuestName,comodName,modul,unit,comodBarcode,prices,number,discount,TotalMoney,realname from CS_Sales a join CS_Guest b on a.guestid=b.guestid join UserInfo c on a.userid=c.userid where modul='" + Request.QueryString["Specifications"] + "' order by C_date desc ";

        PageNavigator1.Total = 1;
        PageNavigator1.Query = sql;
    }
    protected void linkbtnSales_Click(object sender, EventArgs e)
    {
        string id = (sender as LinkButton).CommandArgument;
        ClientScript.RegisterStartupScript(typeof(Page), "aa", "PrintData('" + id + "')", true);
    }
}
